﻿namespace ExamV5.CheckPaper
{
    using ExamV5;
    //using mscorlib;
    using System;
    using System.Configuration;
    using System.Data;
    using System.Data.SqlClient;
    using System.Web;
    using System.Web.UI;
    using System.Web.UI.HtmlControls;
    using System.Web.UI.WebControls;

    public class CheckPaperInfoing : Page
    {
        protected Button butCheck;
        protected Button butHReturn;
        protected Button butReturn;
        protected GridView DataGridD;
        protected GridView DataGridE;
        protected GridView DataGridF;
        protected GridView DataGridG;
        protected GridView DataGridH;
        protected GridView DataGridI;
        protected GridView DataGridJ;
        private double double_0 = 0.0;
        protected HtmlForm form1;
        protected HtmlHead Head1;
        private HttpCookie httpCookie_0 = null;
        private HttpCookie httpCookie_1 = null;
        private HttpCookie httpCookie_2 = null;
        private HttpCookie httpCookie_3 = null;
        private int int_0 = 0;
        protected Label labCheckFen;
        protected Label labDFen;
        protected Label labDistFen;
        protected Label labDTitle;
        protected Label labEFen;
        protected Label labETitle;
        protected Label labExamName;
        protected Label labFFen;
        protected Label labFTitle;
        protected Label labGFen;
        protected Label labGTitle;
        protected Label labHFen;
        protected Label labHTitle;
        protected Label labIFen;
        protected Label labITitle;
        protected Label labJFen;
        protected Label labJTitle;
        private PublicFun publicFun_0 = new PublicFun();
        private string string_0 = "";
        private string[] string_1;
        private string[] string_10;
        private string[] string_11;
        private string[] string_12;
        private string[] string_13;
        private string[] string_14;
        private string string_15 = "";
        private string string_16 = "";
        private string string_17 = "";
        private string string_18 = "";
        private string string_19 = "";
        private string[] string_2;
        private string string_20 = "";
        private string string_21 = "";
        private string[] string_3;
        private string[] string_4;
        private string[] string_5;
        private string[] string_6;
        private string[] string_7;
        private string[] string_8;
        private string[] string_9;

        protected void butCheck_Click(object sender, EventArgs e)
        {
            double num = 0.0;
            string str = "还未批改";
            string str2 = "还未批改";
            string str3 = "还未批改";
            string str4 = "还未批改";
            string str5 = "还未批改";
            string str6 = "还未批改";
            string str7 = "还未批改";
            string str8 = "";
            string str9 = "";
            string str10 = "";
            string str11 = "";
            string str12 = "";
            string str13 = "";
            string str14 = "";
            string str15 = "";
            string str16 = "";
            string str17 = "";
            string str18 = "";
            string str19 = "";
            string str20 = "";
            string str21 = "";
            bool flag = false;
            string str22 = "";
            double num2 = 0.0;
            double num3 = 0.0;
            string str23 = "";
            string str24 = "";
            string str25 = "";
            string str26 = "";
            string str27 = "";
            string str28 = "";
            string str29 = "";
            if (!this.DataGridD.Visible)
            {
                goto Label_036A;
            }
            int index = 0;
        Label_0101:
            if (index < this.DataGridD.Rows.Count)
            {
                System.Boolean ReflectorVariable0;
                Label label8 = (Label) this.DataGridD.Rows[index].FindControl("labDFen");
                TextBox box17 = (TextBox) this.DataGridD.Rows[index].FindControl("txtDFen");
                TextBox box19 = (TextBox) this.DataGridD.Rows[index].FindControl("txtDMemo");
                TextBox box18 = (TextBox) this.DataGridD.Rows[index].FindControl("txtUserDFen");
                DropDownList list5 = (DropDownList) this.DataGridD.Rows[index].FindControl("DDLUserDFen");
                if (box17.Text.Trim() == "")
                {
                    box17.Text = "0";
                }
                if ((box17.Text.Trim() == "") || (box18.Text.Trim() == ""))
                {
                    flag = true;
                }
                try
                {
                    num3 = Convert.ToDouble(box17.Text.Trim());
                    if (!(list5.SelectedItem.Value == "+"))
                    {
                        num3 -= Convert.ToDouble(box18.Text.Trim());
                    }
                    else
                    {
                        num3 += Convert.ToDouble(box18.Text.Trim());
                    }
                    num2 = Convert.ToDouble(label8.Text.Trim());
                }
                catch
                {
                    flag = true;
                }
                if (num3 >= 0.0)
                {
                    ReflectorVariable0 = false;
                }
                else
                {
                    ReflectorVariable0 = true;
                }
                if (ReflectorVariable0 || (num3 > num2))
                {
                    flag = true;
                }
                if (flag)
                {
                    str22 = "填空题未批改完成或非法批改！";
                }
                else
                {
                    str = this.httpCookie_1.Value.Trim();
                    str8 = str8 + box17.Text.Trim() + "|";
                    str17 = str17 + list5.SelectedItem.Value + box18.Text.Trim() + "|";
                    num += num3;
                    str23 = str23 + box19.Text.Trim().Replace("|", "｜") + "|";
                    index++;
                    goto Label_0101;
                }
            }
        Label_036A:
            if (this.DataGridE.Visible ? !(str22.Trim() == "") : true)
            {
                goto Label_05FF;
            }
            index = 0;
        Label_0396:
            if (index < this.DataGridE.Rows.Count)
            {
                System.Boolean ReflectorVariable1;
                Label label7 = (Label) this.DataGridE.Rows[index].FindControl("labEFen");
                TextBox box14 = (TextBox) this.DataGridE.Rows[index].FindControl("txtEFen");
                TextBox box16 = (TextBox) this.DataGridE.Rows[index].FindControl("txtEMemo");
                TextBox box15 = (TextBox) this.DataGridE.Rows[index].FindControl("txtUserEFen");
                DropDownList list4 = (DropDownList) this.DataGridE.Rows[index].FindControl("DDLUserEFen");
                if (box14.Text.Trim() == "")
                {
                    box14.Text = "0";
                }
                if (!(!(box14.Text.Trim() == "") ? !(box15.Text.Trim() == "") : false))
                {
                    flag = true;
                }
                try
                {
                    num3 = Convert.ToDouble(box14.Text.Trim());
                    if (!(list4.SelectedItem.Value == "+"))
                    {
                        num3 -= Convert.ToDouble(box15.Text.Trim());
                    }
                    else
                    {
                        num3 += Convert.ToDouble(box15.Text.Trim());
                    }
                    num2 = Convert.ToDouble(label7.Text.Trim());
                }
                catch
                {
                    flag = true;
                }
                if (num3 >= 0.0)
                {
                    ReflectorVariable1 = false;
                }
                else
                {
                    ReflectorVariable1 = true;
                }
                if (ReflectorVariable1 || (num3 > num2))
                {
                    flag = true;
                }
                if (flag)
                {
                    str22 = "简答题未批改完成或非法批改！";
                }
                else
                {
                    str2 = this.httpCookie_1.Value.Trim();
                    str9 = str9 + box14.Text.Trim() + "|";
                    str16 = str16 + list4.SelectedItem.Value + box15.Text.Trim() + "|";
                    num += num3;
                    str24 = str24 + box16.Text.Trim().Replace("|", "｜") + "|";
                    index++;
                    goto Label_0396;
                }
            }
        Label_05FF:
            if (this.DataGridF.Visible ? !(str22.Trim() == "") : true)
            {
                goto Label_07AD;
            }
            index = 0;
        Label_062B:
            if (index < this.DataGridF.Rows.Count)
            {
                System.Boolean ReflectorVariable2;
                Label label6 = (Label) this.DataGridF.Rows[index].FindControl("labFFen");
                TextBox box12 = (TextBox) this.DataGridF.Rows[index].FindControl("txtFFen");
                TextBox box13 = (TextBox) this.DataGridF.Rows[index].FindControl("txtFMemo");
                if (box12.Text.Trim() == "")
                {
                    flag = true;
                }
                try
                {
                    num3 = Convert.ToDouble(box12.Text.Trim());
                    num2 = Convert.ToDouble(label6.Text.Trim());
                }
                catch
                {
                    flag = true;
                }
                if (num3 >= 0.0)
                {
                    ReflectorVariable2 = false;
                }
                else
                {
                    ReflectorVariable2 = true;
                }
                if (ReflectorVariable2 || (num3 > num2))
                {
                    flag = true;
                }
                if (flag)
                {
                    str22 = "作文题未批改完成或非法批改！";
                }
                else
                {
                    str3 = this.httpCookie_1.Value.Trim();
                    str10 = str10 + "0|";
                    str20 = str20 + "+" + box12.Text.Trim() + "|";
                    num += num3;
                    str25 = str25 + box13.Text.Trim().Replace("|", "｜") + "|";
                    index++;
                    goto Label_062B;
                }
            }
        Label_07AD:
            if (!this.DataGridG.Visible || !(str22.Trim() == ""))
            {
                goto Label_0A40;
            }
            index = 0;
        Label_07D9:
            if (index < this.DataGridG.Rows.Count)
            {
                System.Boolean ReflectorVariable3;
                Label label5 = (Label) this.DataGridG.Rows[index].FindControl("labGFen");
                TextBox box9 = (TextBox) this.DataGridG.Rows[index].FindControl("txtGFen");
                TextBox box11 = (TextBox) this.DataGridG.Rows[index].FindControl("txtGMemo");
                TextBox box10 = (TextBox) this.DataGridG.Rows[index].FindControl("txtUserGFen");
                DropDownList list3 = (DropDownList) this.DataGridG.Rows[index].FindControl("DDLUserGFen");
                if (box9.Text.Trim() == "")
                {
                    box9.Text = "0";
                }
                if (!(!(box9.Text.Trim() == "") ? !(box10.Text.Trim() == "") : false))
                {
                    flag = true;
                }
                try
                {
                    num3 = Convert.ToDouble(box9.Text.Trim());
                    if (!(list3.SelectedItem.Value == "+"))
                    {
                        num3 -= Convert.ToDouble(box10.Text.Trim());
                    }
                    else
                    {
                        num3 += Convert.ToDouble(box10.Text.Trim());
                    }
                    num2 = Convert.ToDouble(label5.Text.Trim());
                }
                catch
                {
                    flag = true;
                }
                if (num3 < 0.0)
                {
                    ReflectorVariable3 = false;
                }
                else
                {
                    ReflectorVariable3 = true;
                }
                if (!(ReflectorVariable3 ? (num3 <= num2) : false))
                {
                    flag = true;
                }
                if (flag)
                {
                    str22 = "论述题未批改完成或非法批改！";
                }
                else
                {
                    str4 = this.httpCookie_1.Value.Trim();
                    str11 = str11 + box9.Text.Trim() + "|";
                    str18 = str18 + list3.SelectedItem.Value + box10.Text.Trim() + "|";
                    num += num3;
                    str26 = str26 + box11.Text.Trim().Replace("|", "｜") + "|";
                    index++;
                    goto Label_07D9;
                }
            }
        Label_0A40:
            if (this.DataGridH.Visible ? !(str22.Trim() == "") : true)
            {
                goto Label_0CD3;
            }
            index = 0;
        Label_0A6C:
            if (index < this.DataGridH.Rows.Count)
            {
                System.Boolean ReflectorVariable4;
                Label label4 = (Label) this.DataGridH.Rows[index].FindControl("labHFen");
                TextBox box6 = (TextBox) this.DataGridH.Rows[index].FindControl("txtHFen");
                TextBox box8 = (TextBox) this.DataGridH.Rows[index].FindControl("txtHMemo");
                TextBox box7 = (TextBox) this.DataGridH.Rows[index].FindControl("txtUserHFen");
                DropDownList list2 = (DropDownList) this.DataGridH.Rows[index].FindControl("DDLUserHFen");
                if (box6.Text.Trim() == "")
                {
                    box6.Text = "0";
                }
                if (!(!(box6.Text.Trim() == "") ? !(box7.Text.Trim() == "") : false))
                {
                    flag = true;
                }
                try
                {
                    num3 = Convert.ToDouble(box6.Text.Trim());
                    if (!(list2.SelectedItem.Value == "+"))
                    {
                        num3 -= Convert.ToDouble(box7.Text.Trim());
                    }
                    else
                    {
                        num3 += Convert.ToDouble(box7.Text.Trim());
                    }
                    num2 = Convert.ToDouble(label4.Text.Trim());
                }
                catch
                {
                    flag = true;
                }
                if (num3 >= 0.0)
                {
                    ReflectorVariable4 = false;
                }
                else
                {
                    ReflectorVariable4 = true;
                }
                if (ReflectorVariable4 || (num3 > num2))
                {
                    flag = true;
                }
                if (flag)
                {
                    str22 = "分析题未批改完成或非法批改！";
                }
                else
                {
                    str5 = this.httpCookie_1.Value.Trim();
                    str12 = str12 + box6.Text.Trim() + "|";
                    str15 = str15 + list2.SelectedItem.Value + box7.Text.Trim() + "|";
                    num += num3;
                    str27 = str27 + box8.Text.Trim().Replace("|", "｜") + "|";
                    index++;
                    goto Label_0A6C;
                }
            }
        Label_0CD3:
            if (!this.DataGridI.Visible || !(str22.Trim() == ""))
            {
                goto Label_0E85;
            }
            index = 0;
        Label_0CFF:
            if (index < this.DataGridI.Rows.Count)
            {
                System.Boolean ReflectorVariable5;
                Label label3 = (Label) this.DataGridI.Rows[index].FindControl("labIFen");
                TextBox box4 = (TextBox) this.DataGridI.Rows[index].FindControl("txtIFen");
                TextBox box5 = (TextBox) this.DataGridI.Rows[index].FindControl("txtIMemo");
                if (box4.Text.Trim() == "")
                {
                    flag = true;
                }
                try
                {
                    num3 = Convert.ToDouble(box4.Text.Trim());
                    num2 = Convert.ToDouble(label3.Text.Trim());
                }
                catch
                {
                    flag = true;
                }
                if (num3 >= 0.0)
                {
                    ReflectorVariable5 = false;
                }
                else
                {
                    ReflectorVariable5 = true;
                }
                if (ReflectorVariable5 || (num3 > num2))
                {
                    flag = true;
                }
                if (flag)
                {
                    str22 = "操作题未批改完成或非法批改！";
                }
                else
                {
                    str6 = this.httpCookie_1.Value.Trim();
                    str13 = str13 + "0|";
                    str21 = str21 + "+" + box4.Text.Trim() + "|";
                    num += num3;
                    str28 = str28 + box5.Text.Trim().Replace("|", "｜") + "|";
                    index++;
                    goto Label_0CFF;
                }
            }
        Label_0E85:
            if (this.DataGridJ.Visible ? !(str22.Trim() == "") : true)
            {
                goto Label_1194;
            }
            index = 0;
        Label_0EB1:
            if (index < this.DataGridJ.Rows.Count)
            {
                System.Boolean ReflectorVariable6;
                Label label = (Label) this.DataGridJ.Rows[index].FindControl("labJFen");
                Label label2 = (Label) this.DataGridJ.Rows[index].FindControl("labJDataTitle");
                TextBox box3 = (TextBox) this.DataGridJ.Rows[index].FindControl("txtJMemo");
                string[] strArray3 = label2.Text.Replace("___", "〓").Split(new char[] { '〓' });
                string[] strArray2 = label.Text.Trim().Split(new char[] { '_' });
                TextBox box = (TextBox) this.DataGridJ.Rows[index].FindControl("txtJFen");
                TextBox box2 = (TextBox) this.DataGridJ.Rows[index].FindControl("txtUserJFen");
                DropDownList list = (DropDownList) this.DataGridJ.Rows[index].FindControl("DDLUserJFen");
                if (box.Text.Trim() == "")
                {
                    box.Text = "0";
                }
                if (!(!(box.Text.Trim() == "") ? !(box2.Text.Trim() == "") : false))
                {
                    flag = true;
                }
                try
                {
                    num3 = Convert.ToDouble(box.Text.Trim());
                    if (!(list.SelectedItem.Value == "+"))
                    {
                        num3 -= Convert.ToDouble(box2.Text.Trim());
                    }
                    else
                    {
                        num3 += Convert.ToDouble(box2.Text.Trim());
                    }
                    num2 = Convert.ToDouble((double) (Convert.ToDouble(strArray2[index]) * (strArray3.Length - 1)));
                }
                catch
                {
                    flag = true;
                }
                if (num3 < 0.0)
                {
                    ReflectorVariable6 = false;
                }
                else
                {
                    ReflectorVariable6 = true;
                }
                if (!(ReflectorVariable6 ? (num3 <= num2) : false))
                {
                    flag = true;
                }
                if (flag)
                {
                    str22 = "综合题未批改完成或非法批改！";
                }
                else
                {
                    str7 = this.httpCookie_1.Value.Trim();
                    str14 = str14 + box.Text.Trim() + "|";
                    str19 = str19 + list.SelectedItem.Value + box2.Text.Trim() + "|";
                    num += num3;
                    str29 = str29 + box3.Text.Trim().Replace("|", "｜") + "|";
                    index++;
                    goto Label_0EB1;
                }
            }
        Label_1194:
            if (!flag)
            {
                string strSql = "";
                string str30 = "";
                string str32 = "";
                string str33 = "";
                string str34 = "";
                string str35 = "";
                string str36 = "";
                string str37 = "";
                string str38 = "";
                if (str8 != "")
                {
                    str32 = ",CheckUserF='" + this.publicFun_0.CheckString(str) + "',RubricFFen='" + this.publicFun_0.CheckString(str8) + "',CheckUserFFen='" + this.publicFun_0.CheckString(str17) + "',CheckMemoF='" + this.publicFun_0.CheckString(str23) + "'";
                }
                if (str9 != "")
                {
                    str33 = ",CheckUserA='" + this.publicFun_0.CheckString(str2) + "',RubricAFen='" + this.publicFun_0.CheckString(str9) + "',CheckUserAFen='" + this.publicFun_0.CheckString(str16) + "',CheckMemoA='" + this.publicFun_0.CheckString(str24) + "'";
                }
                if (str10 != "")
                {
                    str34 = ",CheckUserC='" + this.publicFun_0.CheckString(str3) + "',RubricCFen='" + this.publicFun_0.CheckString(str10) + "',CheckUserCFen='" + this.publicFun_0.CheckString(str20) + "',CheckMemoC='" + this.publicFun_0.CheckString(str25) + "'";
                }
                if (str11 != "")
                {
                    str35 = ",CheckUserT='" + this.publicFun_0.CheckString(str4) + "',RubricTFen='" + this.publicFun_0.CheckString(str11) + "',CheckUserTFen='" + this.publicFun_0.CheckString(str18) + "',CheckMemoT='" + this.publicFun_0.CheckString(str26) + "'";
                }
                if (str12 != "")
                {
                    str36 = ",CheckUserAN='" + this.publicFun_0.CheckString(str5) + "',RubricANFen='" + this.publicFun_0.CheckString(str12) + "',CheckUserANFen='" + this.publicFun_0.CheckString(str15) + "',CheckMemoAN='" + this.publicFun_0.CheckString(str27) + "'";
                }
                if (str13 != "")
                {
                    str37 = ",CheckUserO='" + this.publicFun_0.CheckString(str6) + "',RubricOFen='" + this.publicFun_0.CheckString(str13) + "',CheckUserOFen='" + this.publicFun_0.CheckString(str21) + "',CheckMemoO='" + this.publicFun_0.CheckString(str28) + "'";
                }
                if (str14 != "")
                {
                    str38 = ",CheckUserJ='" + this.publicFun_0.CheckString(str7) + "',RubricJFen='" + this.publicFun_0.CheckString(str14) + "',CheckUserJFen='" + this.publicFun_0.CheckString(str19) + "',CheckMemoJ='" + this.publicFun_0.CheckString(str29) + "'";
                }
                strSql = "Update [CheckPaper] set UserCode='" + this.string_0 + "'";
                strSql = string.Concat(new object[] { strSql, str32, str33, str34, str35, str36, str37, str38, " where PaperID=", this.int_0, " and UserCode='", this.string_0, "'" });
                this.ViewState["GetCountFen"] = this.publicFun_0.GetValues(string.Concat(new object[] { "select GetoldCountFen from ExamUser where UserCode='", this.string_0, "' and PaperID=", this.int_0 }), "GetoldCountFen");
                num = Convert.ToDouble(this.ViewState["GetCountFen"].ToString()) + num;
                this.publicFun_0.ExecuteSql(strSql);
                if (!(this.publicFun_0.GetValues(string.Concat(new object[] { "select UserCode from [CheckPaper] where (CheckUserF='还未批改' or CheckUserA='还未批改' or  CheckUserC='还未批改' or  CheckUserT='还未批改' or  CheckUserAN='还未批改' or  CheckUserO='还未批改' or  CheckUserJ='还未批改') and PaperID=", this.int_0, " and UserCode='", this.string_0, "'" }), "UserCode") == ""))
                {
                    str30 = string.Concat(new object[] { "update ExamUser set Flag='D',GetCountFen=", num, "-", Convert.ToDouble(this.labCheckFen.Text.Trim()), " where PaperID=", this.int_0, " and UserCode='", this.string_0, "'" });
                }
                else
                {
                    str30 = string.Concat(new object[] { "update ExamUser set Flag='E',GetCountFen=", num, "-", Convert.ToDouble(this.labCheckFen.Text.Trim()), " where PaperID=", this.int_0, " and UserCode='", this.string_0, "'" });
                    double num4 = num - Convert.ToDouble(this.labCheckFen.Text.Trim());
                    this.method_11(num4);
                }
                try
                {
                    try
                    {
                        this.publicFun_0.ExecuteSql(string.Concat(new object[] { str30, ";update CheckPaper set CheckStatus='A',LastCheckUser=''  where UserCode='", this.string_0.Trim(), "' and PaperID=", this.int_0 }));
                        base.Response.Write("<script>alert('批改试卷操作成功！');window.close();</script>");
                    }
                    catch
                    {
                        base.Response.Write("<script>alert('提交批改试卷失败！')</script>");
                    }
                }
                finally
                {
                }
            }
            else
            {
                base.Response.Write("<script>alert('" + str22 + "')</script>");
            }
        }

        protected void butHReturn_Click(object sender, EventArgs e)
        {
            if (this.butCheck.Visible)
            {
                this.publicFun_0.ExecuteSql(string.Concat(new object[] { "update CheckPaper set CheckStatus='A',LastCheckUser=''  where UserCode='", this.string_0.Trim(), "' and PaperID=", this.int_0 }));
            }
            base.Response.Write("<script>window.close();</script>");
        }

        protected void butReturn_Click(object sender, EventArgs e)
        {
            if (this.butCheck.Visible)
            {
                this.publicFun_0.ExecuteSql(string.Concat(new object[] { "update CheckPaper set CheckStatus='A',LastCheckUser=''  where UserCode='", this.string_0.Trim(), "' and PaperID=", this.int_0 }));
            }
            base.Response.Write("<script>window.close();</script>");
        }

        private void method_0()
        {
            string cmdText = "select RubricTypeName  from PaperInfo where ID='" + this.int_0 + "'";
            SqlConnection connection = new SqlConnection(ConfigurationManager.ConnectionStrings["Conn"].ConnectionString);
            connection.Open();
            SqlCommand command = new SqlCommand(cmdText, connection);
            SqlDataReader reader = command.ExecuteReader(CommandBehavior.CloseConnection);
            if (reader.Read())
            {
                string[] strArray = reader["RubricTypeName"].ToString().Split(new char[] { '#' });
                for (int i = 0; i < strArray.Length; i++)
                {
                    switch (i)
                    {
                        case 3:
                            this.labDTitle.Text = strArray[i].Trim();
                            break;

                        case 4:
                            this.labETitle.Text = strArray[i].Trim();
                            break;

                        case 5:
                            this.labFTitle.Text = strArray[i].Trim();
                            break;

                        case 6:
                            this.labGTitle.Text = strArray[i].Trim();
                            break;

                        case 7:
                            this.labHTitle.Text = strArray[i].Trim();
                            break;

                        case 8:
                            this.labITitle.Text = strArray[i].Trim();
                            break;

                        case 9:
                            this.labJTitle.Text = strArray[i].Trim();
                            break;
                    }
                }
            }
            if (this.labDTitle.Text.Trim() == "")
            {
                this.labDTitle.Text = "填空题";
            }
            if (this.labETitle.Text.Trim() == "")
            {
                this.labETitle.Text = "简答题";
            }
            if (this.labFTitle.Text.Trim() == "")
            {
                this.labFTitle.Text = "作文题";
            }
            if (this.labGTitle.Text.Trim() == "")
            {
                this.labGTitle.Text = "论述题";
            }
            if (this.labHTitle.Text.Trim() == "")
            {
                this.labHTitle.Text = "分析题";
            }
            if (this.labITitle.Text.Trim() == "")
            {
                this.labITitle.Text = "操作题";
            }
            if (this.labJTitle.Text.Trim() == "")
            {
                this.labJTitle.Text = "综合题";
            }
            reader.Close();
            command.Dispose();
            connection.Close();
            connection.Dispose();
        }

        private void method_1()
        {
            try
            {
                SqlConnection connection = new SqlConnection(ConfigurationManager.ConnectionStrings["Conn"].ConnectionString);
                connection.Open();
                SqlCommand command = new SqlCommand(string.Concat(new object[] { "select * from [CheckPaper] where UserCode='", this.string_0.Trim(), "' and PaperID=", this.int_0 }), connection);
                SqlDataReader reader = command.ExecuteReader(CommandBehavior.CloseConnection);
                if (reader.Read())
                {
                    this.string_1 = reader["RubricFWrite"].ToString().Trim().Split(new char[] { '|' });
                    this.string_2 = reader["RubricAWrite"].ToString().Trim().Split(new char[] { '|' });
                    this.string_3 = reader["RubricCWrite"].ToString().Trim().Split(new char[] { '|' });
                    this.string_4 = reader["RubricTWrite"].ToString().Trim().Split(new char[] { '|' });
                    this.string_5 = reader["RubricANWrite"].ToString().Trim().Split(new char[] { '|' });
                    this.string_6 = reader["RubricOWrite"].ToString().Trim().Split(new char[] { '|' });
                    this.string_7 = reader["RubricJWrite"].ToString().Trim().Split(new char[] { '|' });
                    this.string_8 = reader["RubricFFen"].ToString().Trim().Split(new char[] { '|' });
                    this.string_9 = reader["RubricAFen"].ToString().Trim().Split(new char[] { '|' });
                    this.string_10 = reader["RubricCFen"].ToString().Trim().Split(new char[] { '|' });
                    this.string_11 = reader["RubricTFen"].ToString().Trim().Split(new char[] { '|' });
                    this.string_12 = reader["RubricANFen"].ToString().Trim().Split(new char[] { '|' });
                    this.string_13 = reader["RubricOFen"].ToString().Trim().Split(new char[] { '|' });
                    this.string_14 = reader["RubricJFen"].ToString().Trim().Split(new char[] { '|' });
                    reader.Close();
                    command.Dispose();
                    connection.Close();
                    connection.Dispose();
                }
                else
                {
                    base.Response.Write("<script>alert('此考生没有保存试卷并强行退出，暂无详细试卷批改记录！')</script>");
                }
            }
            catch (Exception exception)
            {
                base.Response.Write("<script>alert('" + exception.Message + "')</script>");
            }
        }

        private void method_10(string string_22, string string_23, string string_24)
        {
            this.DataGridJ.Visible = true;
            int num = 0;
            string selectCommandText = "Select ID,SubjectID,RubricType,RubricTitle,OptionAnswer,OKAnswer,OKMemo  from RubricInfo  where RubricType='J'";
            selectCommandText = selectCommandText + " and ID in(" + string_22.Replace("#", ",") + "0) order by " + string_24;
            SqlConnection selectConnection = new SqlConnection(ConfigurationManager.ConnectionStrings["Conn"].ConnectionString);
            SqlDataAdapter adapter = new SqlDataAdapter(selectCommandText, selectConnection);
            DataSet dataSet = new DataSet();
            adapter.Fill(dataSet, "JRubric");
            this.DataGridJ.DataSource = dataSet.Tables["JRubric"].DefaultView;
            this.DataGridJ.DataBind();
            int index = 0;
            while (true)
            {
                if (index >= this.DataGridJ.Rows.Count)
                {
                    break;
                }
                try
                {
                    num++;
                    Label label = (Label) this.DataGridJ.Rows[index].FindControl("labJDataTitle");
                    label.Text = num.ToString() + "、" + label.Text.ToString();
                    Label label2 = (Label) this.DataGridJ.Rows[index].FindControl("labJUserAnswer");
                    TextBox box = (TextBox) this.DataGridJ.Rows[index].FindControl("txtJFen");
                    label2.Text = this.string_7[index];
                    box.Text = this.string_14[index].Trim();
                    if (this.string_14[index].Trim().Length > 0)
                    {
                        this.double_0 += Convert.ToDouble(this.string_14[index].Trim());
                    }
                    Label label3 = (Label) this.DataGridJ.Rows[index].FindControl("labJFen");
                    label3.Text = string_23;
                }
                catch
                {
                }
                index++;
            }
            adapter.Dispose();
            dataSet.Clear();
            dataSet.Dispose();
            selectConnection.Close();
            selectConnection.Dispose();
        }

        private void method_11(double double_1)
        {
            double num = 0.0;
            string values = this.publicFun_0.GetValues(string.Concat(new object[] { "select StudyFen from GradeReule where PaperID=", this.int_0, " and (", double_1, ">=MinValue  and ", double_1, "<=MaxValue)" }), "StudyFen");
            if (values.Trim() == "")
            {
                values = "0";
            }
            num = Convert.ToDouble(values);
            string str2 = this.ViewState["ExamName"].ToString();
            this.publicFun_0.ExecuteSql(string.Concat(new object[] { "delete  UserStudyFen where ExamOrStudy='E' and UserCode='", this.string_0, "' and Formtable='PaperInfo' and FormID=", this.int_0, ";insert into UserStudyFen(UserCode,ExamStudyName,StudyFen,Formtable,FormID,ExamOrStudy) values('", this.string_0, "','", str2, "','", num, "','PaperInfo','", this.int_0, "','E')" }));
        }

        private string method_2(int int_1)
        {
            switch (int_1)
            {
                case 1:
                    return "一、";

                case 2:
                    return "二、";

                case 3:
                    return "三、";

                case 4:
                    return "四、";

                case 5:
                    return "五、";

                case 6:
                    return "六、";

                case 7:
                    return "七、";

                case 8:
                    return "八、";

                case 9:
                    return "九、";

                case 10:
                    return "十、";
            }
            return "";
        }

        private void method_3()
        {
            try
            {
                string str2 = "";
                string str3 = "";
                string str4 = "";
                string str5 = "";
                string str6 = "";
                string str7 = "";
                string str8 = "";
                string str9 = "";
                string str10 = "";
                string str11 = "";
                string str12 = "";
                string str13 = "";
                string str14 = "";
                string str15 = "";
                string str16 = "";
                string str17 = "";
                string str18 = "";
                string str19 = "";
                SqlConnection connection = new SqlConnection(ConfigurationManager.ConnectionStrings["Conn"].ConnectionString);
                connection.Open();
                SqlCommand command = new SqlCommand(string.Concat(new object[] { "select d.CheckUserF,d.CheckUserA,d.CheckUserC,d.CheckUserT,d.CheckUserAn,d.CheckUserO,d.CheckUserJ,c.GetCountFen,b.SortInfo,a.ExamName,a.SubjectName,a.PaperFen,a.ExamTime,a.RubricDist,a.FenDist,a.MemoDist,b.RubricS,b.RubricD,b.RubricB,b.RubricF,b.RubricA,b.RubricC,b.RubricT,b.RubricAN,b.RubricO,b.RubricJ  from PaperInfo a ,PaperData b,ExamUser c ,CheckPaper d where c.Flag='D' and d.PaperID=a.ID and d.UserCode=c.UserCode and  c.PaperID=b.PaperID and c.UserCode=b.UserCode and a.ID=b.PaperID  and b.UserCode='", this.string_0.Trim(), "' and a.ID=", this.int_0 }), connection);
                SqlDataReader reader = command.ExecuteReader(CommandBehavior.CloseConnection);
                if (reader.Read())
                {
                    this.labExamName.Text = reader["ExamName"].ToString() + "(科目:" + reader["SubjectName"].ToString() + ")";
                    this.ViewState["ExamName"] = reader["ExamName"].ToString();
                    str2 = reader["RubricDist"].ToString();
                    str3 = reader["FenDist"].ToString();
                    str4 = reader["MemoDist"].ToString();
                    str5 = reader["SortInfo"].ToString();
                    str6 = reader["RubricF"].ToString();
                    str7 = reader["RubricA"].ToString();
                    str8 = reader["RubricC"].ToString();
                    str9 = reader["RubricT"].ToString();
                    str10 = reader["RubricAN"].ToString();
                    str11 = reader["RubricO"].ToString();
                    str12 = reader["RubricJ"].ToString();
                    str13 = reader["CheckUserF"].ToString();
                    str14 = reader["CheckUserA"].ToString();
                    str15 = reader["CheckUserC"].ToString();
                    str16 = reader["CheckUserT"].ToString();
                    str17 = reader["CheckUserAn"].ToString();
                    str18 = reader["CheckUserO"].ToString();
                    str19 = reader["CheckUserJ"].ToString();
                    this.labDistFen.Text = str3;
                    this.ViewState["GetCountFen"] = reader["GetCountFen"].ToString();
                }
                reader.Close();
                command.Dispose();
                connection.Close();
                connection.Dispose();
                string str20 = "";
                str20 = "<table   borderColor='#cccccc' cellSpacing='0' borderColorDark='#ffffff' cellPadding='0' width='100%' align='center' border='1' style='border-style:Solid;'>";
                str20 = str20 + "<tr height='30'><td align='left' bgcolor='#5AA6E4'>";
                string[] strArray = str2.Split(new char[] { '#' });
                string[] strArray3 = str3.Split(new char[] { '#' });
                string[] strArray4 = str4.Split(new char[] { '#' });
                string[] strArray5 = str5.Split(new char[] { '#' });
                int num = 0;
                if (strArray.Length <= 1)
                {
                    base.Response.Write("<script>alert('没有找到相关数据！')</script>");
                }
                else
                {
                    if (((strArray[3] != "0") && (this.string_15 == "Y")) && (str13 == "还未批改"))
                    {
                        num++;
                        this.labDTitle.Visible = true;
                        this.labDFen.Text = strArray3[3].Trim();
                        this.labDTitle.Text = "<br>" + str20 + "<font color='#ffffff'><a name='RubricTypeD'></a>&nbsp;&nbsp;<b>" + this.method_2(num) + this.labDTitle.Text + "</b>&nbsp;&nbsp;&nbsp;&nbsp;(共<font color='#ff0000'>" + strArray[3] + "</font>题,每题<font color='#ff0000'>" + strArray3[3] + "</font>分,说明:" + strArray4[3] + ")</font></td></tr></table><br>";
                        this.method_4(str6, strArray3[3], strArray5[3]);
                    }
                    if (((strArray[4] != "0") && (this.string_16 == "Y")) && (str14 == "还未批改"))
                    {
                        num++;
                        this.labETitle.Visible = true;
                        this.labETitle.Text = "<br>" + str20 + "<font color='#ffffff'><a name='RubricTypeE'></a>&nbsp;&nbsp;<b>" + this.method_2(num) + this.labETitle.Text + "</b>&nbsp;&nbsp;&nbsp;&nbsp;(共<font color='#ff0000'>" + strArray[4] + "</font>题,每题<font color='#ff0000'>" + strArray3[4] + "</font>分,说明:" + strArray4[4] + ")</font></td></tr></table><br>";
                        this.labEFen.Text = strArray3[4].Trim();
                        this.method_5(str7, strArray3[4], strArray5[4]);
                    }
                    if (((strArray[5] != "0") && (this.string_17 == "Y")) && (str15 == "还未批改"))
                    {
                        num++;
                        this.labFTitle.Visible = true;
                        this.labFTitle.Text = "<br>" + str20 + "<font color='#ffffff'><a name='RubricTypeF'></a>&nbsp;&nbsp;<b>" + this.method_2(num) + this.labFTitle.Text + "</b>&nbsp;&nbsp;&nbsp;&nbsp;(共<font color='#ff0000'>" + strArray[5] + "</font>题,每题<font color='#ff0000'>" + strArray3[5] + "</font>分,说明:" + strArray4[5] + ")</font></td></tr></table><br>";
                        this.labFFen.Text = strArray3[5].Trim();
                        this.method_6(str8, strArray3[5], strArray5[5]);
                    }
                    if (((strArray[6] != "0") && (this.string_18 == "Y")) && (str16 == "还未批改"))
                    {
                        num++;
                        this.labGTitle.Visible = true;
                        this.labGTitle.Text = "<br>" + str20 + "<font color='#ffffff'><a name='RubricTypeG'></a>&nbsp;&nbsp;<b>" + this.method_2(num) + this.labGTitle.Text + "</b>&nbsp;&nbsp;&nbsp;&nbsp;(共<font color='#ff0000'>" + strArray[6] + "</font>题,每题<font color='#ff0000'>" + strArray3[6] + "</font>分,说明:" + strArray4[6] + ")</font></td></tr></table><br>";
                        this.labGFen.Text = strArray3[6].Trim();
                        this.method_7(str9, strArray3[6], strArray5[6]);
                    }
                    if (((strArray[7] != "0") && (this.string_19 == "Y")) && (str17 == "还未批改"))
                    {
                        num++;
                        this.labHTitle.Visible = true;
                        this.labHTitle.Text = "<br>" + str20 + "<font color='#ffffff'><a name='RubricTypeH'></a>&nbsp;&nbsp;<b>" + this.method_2(num) + this.labHTitle.Text + "</b>&nbsp;&nbsp;&nbsp;&nbsp;(共<font color='#ff0000'>" + strArray[7] + "</font>题,每题<font color='#ff0000'>" + strArray3[7] + "</font>分,说明:" + strArray4[7] + ")</font></td></tr></table><br>";
                        this.labHFen.Text = strArray3[7].Trim();
                        this.method_8(str10, strArray3[7], strArray5[7]);
                    }
                    if (((strArray[8] != "0") && (this.string_20 == "Y")) && (str18 == "还未批改"))
                    {
                        num++;
                        this.labITitle.Visible = true;
                        this.labITitle.Text = "<br>" + str20 + "<font color='#ffffff'><a name='RubricTypeI'></a>&nbsp;&nbsp;<b>" + this.method_2(num) + this.labITitle.Text + "</b>&nbsp;&nbsp;&nbsp;&nbsp;(共<font color='#ff0000'>" + strArray[8] + "</font>题,每题<font color='#ff0000'>" + strArray3[8] + "</font>分,说明:" + strArray4[8] + ")</font></td></tr></table><br>";
                        this.labIFen.Text = strArray3[8].Trim();
                        this.method_9(str11, strArray3[8], strArray5[8]);
                    }
                    if (((strArray[9] != "0") && (this.string_21 == "Y")) && (str19 == "还未批改"))
                    {
                        num++;
                        this.labJTitle.Visible = true;
                        this.labJTitle.Text = "<br>" + str20 + "<font color='#ffffff'><a name='RubricTypeJ'></a>&nbsp;&nbsp;<b>" + this.method_2(num) + this.labJTitle.Text + "</b>&nbsp;&nbsp;&nbsp;&nbsp;(共<font color='#ff0000'>" + Convert.ToString(strArray[9].ToString().Split(new char[] { '_' }).Length) + "</font>题,每题<font color='#ff0000'>" + strArray3[9].Replace("_", " /") + "</font>分,说明:" + strArray4[9].Replace("＃", "#") + ")</font></td></tr></table><br>";
                        this.labJFen.Text = strArray3[9].Trim();
                        this.method_10(str12, strArray3[9], strArray5[9]);
                    }
                }
            }
            catch (Exception exception)
            {
                base.Response.Write("<script>alert('" + exception.Message + "')</script>");
            }
        }

        private void method_4(string string_22, string string_23, string string_24)
        {
            this.DataGridD.Visible = true;
            int num = 0;
            string selectCommandText = "Select ID,SubjectID,RubricType,RubricTitle,OptionAnswer,OKAnswer,OKMemo from RubricInfo where RubricType='D'";
            selectCommandText = selectCommandText + " and ID in(" + string_22.Replace("#", ",") + "0) order by " + string_24;
            SqlConnection selectConnection = new SqlConnection(ConfigurationManager.ConnectionStrings["Conn"].ConnectionString);
            SqlDataAdapter adapter = new SqlDataAdapter(selectCommandText, selectConnection);
            DataSet dataSet = new DataSet();
            adapter.Fill(dataSet, "FRubric");
            this.DataGridD.DataSource = dataSet.Tables["FRubric"].DefaultView;
            this.DataGridD.DataBind();
            int index = 0;
            while (true)
            {
                if (index >= this.DataGridD.Rows.Count)
                {
                    break;
                }
                try
                {
                    num++;
                    Label label = (Label) this.DataGridD.Rows[index].FindControl("labDDataTitle");
                    label.Text = num.ToString() + "、" + label.Text.ToString();
                    Label label2 = (Label) this.DataGridD.Rows[index].FindControl("labOKDAnswer");
                    label2.Text = label2.Text.Replace("#", "，");
                    label2.Text = label2.Text.Replace("#", "，");
                    label2.Text = label2.Text.Replace("，，", "");
                    label2.Text = label2.Text.Replace("，，，", "");
                    label2.Text = label2.Text.Replace("，，，，", "");
                    label2.Text = label2.Text.Replace("，，，，，", "");
                    label2.Text = label2.Text.Replace(":/", "或者");
                    Label label3 = (Label) this.DataGridD.Rows[index].FindControl("labDUserAnswer");
                    label3.Text = this.string_1[index].Replace("#", "，");
                    label3.Text = label3.Text.Replace("，，", "");
                    label3.Text = label3.Text.Replace("，，，", "");
                    label3.Text = label3.Text.Replace("，，，，", "");
                    label3.Text = label3.Text.Replace("，，，，，", "");
                    TextBox box = (TextBox) this.DataGridD.Rows[index].FindControl("txtDFen");
                    box.Text = this.string_8[index].Trim();
                    if (this.string_8[index].Trim().Length > 0)
                    {
                        this.double_0 += Convert.ToDouble(this.string_8[index].Trim());
                    }
                    Label label4 = (Label) this.DataGridD.Rows[index].FindControl("labDFen");
                    label4.Text = string_23;
                }
                catch
                {
                }
                index++;
            }
            adapter.Dispose();
            dataSet.Clear();
            dataSet.Dispose();
            selectConnection.Close();
            selectConnection.Dispose();
        }

        private void method_5(string string_22, string string_23, string string_24)
        {
            this.DataGridE.Visible = true;
            int num = 0;
            string selectCommandText = "Select ID,SubjectID,RubricType,RubricTitle,OptionAnswer,OKAnswer,OKMemo from RubricInfo  where RubricType='E'";
            selectCommandText = selectCommandText + " and ID in(" + string_22.Replace("#", ",") + "0) order by " + string_24;
            SqlConnection selectConnection = new SqlConnection(ConfigurationManager.ConnectionStrings["Conn"].ConnectionString);
            SqlDataAdapter adapter = new SqlDataAdapter(selectCommandText, selectConnection);
            DataSet dataSet = new DataSet();
            adapter.Fill(dataSet, "ARubric");
            this.DataGridE.DataSource = dataSet.Tables["ARubric"].DefaultView;
            this.DataGridE.DataBind();
            int index = 0;
            while (true)
            {
                if (index >= this.DataGridE.Rows.Count)
                {
                    break;
                }
                try
                {
                    num++;
                    Label label = (Label) this.DataGridE.Rows[index].FindControl("labEDataTitle");
                    label.Text = num.ToString() + "、" + label.Text.ToString();
                    Label label2 = (Label) this.DataGridE.Rows[index].FindControl("labEUserAnswer");
                    TextBox box = (TextBox) this.DataGridE.Rows[index].FindControl("txtEFen");
                    label2.Text = this.string_2[index];
                    box.Text = this.string_9[index].Trim();
                    if (this.string_9[index].Trim().Length > 0)
                    {
                        this.double_0 += Convert.ToDouble(this.string_9[index].Trim());
                    }
                    Label label3 = (Label) this.DataGridE.Rows[index].FindControl("labEFen");
                    label3.Text = string_23;
                    Label label4 = (Label) this.DataGridE.Rows[index].FindControl("labOKEAnswer");
                    string[] strArray2 = label4.Text.Split(new char[] { ',' });
                    for (int i = 0; i < strArray2.Length; i++)
                    {
                        label2.Text = label2.Text.Replace(strArray2[i].Trim(), "<font color='blue'>" + strArray2[i].Trim() + "</font>");
                    }
                }
                catch
                {
                }
                index++;
            }
            adapter.Dispose();
            dataSet.Clear();
            dataSet.Dispose();
            selectConnection.Close();
            selectConnection.Dispose();
        }

        private void method_6(string string_22, string string_23, string string_24)
        {
            this.DataGridF.Visible = true;
            int num = 0;
            string selectCommandText = "Select ID,SubjectID,RubricType,RubricTitle,OptionAnswer,OKAnswer,OKMemo  from RubricInfo  where RubricType='F'";
            selectCommandText = selectCommandText + " and ID in(" + string_22.Replace("#", ",") + "0) order by " + string_24;
            SqlConnection selectConnection = new SqlConnection(ConfigurationManager.ConnectionStrings["Conn"].ConnectionString);
            SqlDataAdapter adapter = new SqlDataAdapter(selectCommandText, selectConnection);
            DataSet dataSet = new DataSet();
            adapter.Fill(dataSet, "CRubric");
            this.DataGridF.DataSource = dataSet.Tables["CRubric"].DefaultView;
            this.DataGridF.DataBind();
            int index = 0;
            while (true)
            {
                if (index >= this.DataGridF.Rows.Count)
                {
                    break;
                }
                try
                {
                    num++;
                    Label label = (Label) this.DataGridF.Rows[index].FindControl("labFDataTitle");
                    label.Text = num.ToString() + "、" + label.Text.ToString();
                    Label label2 = (Label) this.DataGridF.Rows[index].FindControl("labFUserAnswer");
                    TextBox box = (TextBox) this.DataGridF.Rows[index].FindControl("txtFFen");
                    label2.Text = "<font color='#0000ff'>作文总字数：(" + this.publicFun_0.RemoveHTML(this.string_3[index]).Length.ToString() + ")</font><br>" + this.string_3[index];
                    box.Text = this.string_10[index].Trim();
                    if (this.string_10[index].Trim().Length > 0)
                    {
                        this.double_0 += Convert.ToDouble(this.string_10[index].Trim());
                    }
                    Label label3 = (Label) this.DataGridF.Rows[index].FindControl("labFFen");
                    label3.Text = string_23;
                }
                catch
                {
                }
                index++;
            }
            adapter.Dispose();
            dataSet.Clear();
            dataSet.Dispose();
            selectConnection.Close();
            selectConnection.Dispose();
        }

        private void method_7(string string_22, string string_23, string string_24)
        {
            this.DataGridG.Visible = true;
            int num = 0;
            string selectCommandText = "Select ID,SubjectID,RubricType,RubricTitle,OptionAnswer,OKAnswer,OKMemo  from RubricInfo  where RubricType='G'";
            selectCommandText = selectCommandText + " and ID in(" + string_22.Replace("#", ",") + "0) order by " + string_24;
            SqlConnection selectConnection = new SqlConnection(ConfigurationManager.ConnectionStrings["Conn"].ConnectionString);
            SqlDataAdapter adapter = new SqlDataAdapter(selectCommandText, selectConnection);
            DataSet dataSet = new DataSet();
            adapter.Fill(dataSet, "TRubric");
            this.DataGridG.DataSource = dataSet.Tables["TRubric"].DefaultView;
            this.DataGridG.DataBind();
            int index = 0;
            while (true)
            {
                if (index >= this.DataGridG.Rows.Count)
                {
                    break;
                }
                try
                {
                    num++;
                    Label label = (Label) this.DataGridG.Rows[index].FindControl("labGDataTitle");
                    label.Text = num.ToString() + "、" + label.Text.ToString();
                    Label label2 = (Label) this.DataGridG.Rows[index].FindControl("labGUserAnswer");
                    TextBox box = (TextBox) this.DataGridG.Rows[index].FindControl("txtGFen");
                    label2.Text = this.string_4[index];
                    box.Text = this.string_11[index].Trim();
                    if (this.string_11[index].Trim().Length > 0)
                    {
                        this.double_0 += Convert.ToDouble(this.string_11[index].Trim());
                    }
                    Label label3 = (Label) this.DataGridG.Rows[index].FindControl("labGFen");
                    label3.Text = string_23;
                    Label label4 = (Label) this.DataGridG.Rows[index].FindControl("labOKGAnswer");
                    string[] strArray2 = label4.Text.Split(new char[] { ',' });
                    for (int i = 0; i < strArray2.Length; i++)
                    {
                        label2.Text = label2.Text.Replace(strArray2[i].Trim(), "<font color='blue'>" + strArray2[i].Trim() + "</font>");
                    }
                }
                catch
                {
                }
                index++;
            }
            adapter.Dispose();
            dataSet.Clear();
            dataSet.Dispose();
            selectConnection.Close();
            selectConnection.Dispose();
        }

        private void method_8(string string_22, string string_23, string string_24)
        {
            this.DataGridH.Visible = true;
            int num = 0;
            string selectCommandText = "Select ID,SubjectID,RubricType,RubricTitle,OptionAnswer,OKAnswer,OKMemo  from RubricInfo  where RubricType='H'";
            selectCommandText = selectCommandText + " and ID in(" + string_22.Replace("#", ",") + "0) order by " + string_24;
            SqlConnection selectConnection = new SqlConnection(ConfigurationManager.ConnectionStrings["Conn"].ConnectionString);
            SqlDataAdapter adapter = new SqlDataAdapter(selectCommandText, selectConnection);
            DataSet dataSet = new DataSet();
            adapter.Fill(dataSet, "ANRubric");
            this.DataGridH.DataSource = dataSet.Tables["ANRubric"].DefaultView;
            this.DataGridH.DataBind();
            int index = 0;
            while (true)
            {
                if (index >= this.DataGridH.Rows.Count)
                {
                    break;
                }
                try
                {
                    num++;
                    Label label = (Label) this.DataGridH.Rows[index].FindControl("labHDataTitle");
                    label.Text = num.ToString() + "、" + label.Text.ToString();
                    Label label2 = (Label) this.DataGridH.Rows[index].FindControl("labHUserAnswer");
                    TextBox box = (TextBox) this.DataGridH.Rows[index].FindControl("txtHFen");
                    label2.Text = this.string_5[index];
                    box.Text = this.string_12[index].Trim();
                    if (this.string_12[index].Trim().Length > 0)
                    {
                        this.double_0 += Convert.ToDouble(this.string_12[index].Trim());
                    }
                    Label label3 = (Label) this.DataGridH.Rows[index].FindControl("labHFen");
                    label3.Text = string_23;
                    Label label4 = (Label) this.DataGridH.Rows[index].FindControl("labOKHAnswer");
                    string[] strArray2 = label4.Text.Split(new char[] { ',' });
                    for (int i = 0; i < strArray2.Length; i++)
                    {
                        label2.Text = label2.Text.Replace(strArray2[i].Trim(), "<font color='blue'>" + strArray2[i].Trim() + "</font>");
                    }
                }
                catch
                {
                }
                index++;
            }
            adapter.Dispose();
            dataSet.Clear();
            dataSet.Dispose();
            selectConnection.Close();
            selectConnection.Dispose();
        }

        private void method_9(string string_22, string string_23, string string_24)
        {
            this.DataGridI.Visible = true;
            int num = 0;
            string selectCommandText = "Select ID,SubjectID,RubricType,RubricTitle,OptionAnswer,OKAnswer,OKMemo  from RubricInfo  where RubricType='I'";
            selectCommandText = selectCommandText + " and ID in(" + string_22.Replace("#", ",") + "0) order by " + string_24;
            SqlConnection selectConnection = new SqlConnection(ConfigurationManager.ConnectionStrings["Conn"].ConnectionString);
            SqlDataAdapter adapter = new SqlDataAdapter(selectCommandText, selectConnection);
            DataSet dataSet = new DataSet();
            adapter.Fill(dataSet, "IRubric");
            this.DataGridI.DataSource = dataSet.Tables["IRubric"].DefaultView;
            this.DataGridI.DataBind();
            int index = 0;
            while (true)
            {
                if (index >= this.DataGridI.Rows.Count)
                {
                    break;
                }
                try
                {
                    num++;
                    Label label = (Label) this.DataGridI.Rows[index].FindControl("labIDataTitle");
                    label.Text = num.ToString() + "、" + label.Text.ToString();
                    Label label2 = (Label) this.DataGridI.Rows[index].FindControl("labIAnswer");
                    Label label3 = (Label) this.DataGridI.Rows[index].FindControl("labOKIAnswer");
                    if (label2.Text.Length > 6)
                    {
                        label2.Text = "&nbsp;&nbsp;&nbsp;&nbsp;<font color='red'>注:</font><a href='../FrmDownLoad.aspx?FileName=" + label2.Text + "' target='_blank'>下载原题</a>";
                    }
                    if (label3.Text.Length > 6)
                    {
                        label3.Text = "<a href='../FrmDownLoad.aspx?FileName=" + label3.Text + "' target='_blank'>下载答案</a>";
                    }
                    Label label5 = (Label) this.DataGridI.Rows[index].FindControl("labIUserAnswer");
                    if (this.string_6[index].Trim().Length <= 6)
                    {
                        label5.Text = "未填写";
                    }
                    else
                    {
                        label5.Text = "<a href='../FrmDownLoad.aspx?FileName=" + this.string_6[index] + "' target='_blank'>查看考生答案</a>";
                    }
                    TextBox box = (TextBox) this.DataGridI.Rows[index].FindControl("txtIFen");
                    box.Text = this.string_13[index].Trim();
                    if (this.string_13[index].Trim().Length > 0)
                    {
                        this.double_0 += Convert.ToDouble(this.string_13[index].Trim());
                    }
                    Label label4 = (Label) this.DataGridI.Rows[index].FindControl("labIFen");
                    label4.Text = string_23;
                }
                catch
                {
                }
                index++;
            }
            adapter.Dispose();
            dataSet.Clear();
            dataSet.Dispose();
            selectConnection.Close();
            selectConnection.Dispose();
        }

        protected void Page_Load(object sender, EventArgs e)
        {
            this.httpCookie_0 = new HttpCookie("ExamUserCode");
            this.httpCookie_0 = base.Request.Cookies["ExamUserCode"];
            this.httpCookie_1 = new HttpCookie("ExamUserName");
            this.httpCookie_1 = base.Request.Cookies["ExamUserName"];
            this.httpCookie_2 = new HttpCookie("ExamUserLevel");
            this.httpCookie_2 = base.Request.Cookies["ExamUserLevel"];
            this.httpCookie_3 = new HttpCookie("ExamDeptID");
            this.httpCookie_3 = base.Request.Cookies["ExamDeptID"];
            if ((this.httpCookie_0 != null) && !(this.httpCookie_0.Value == ""))
            {
                base.Response.Cache.SetCacheability(HttpCacheability.NoCache);
                base.Response.Cache.SetNoStore();
                this.httpCookie_0.Value = this.publicFun_0.CheckString(base.Server.UrlDecode(this.httpCookie_0.Value));
                this.httpCookie_1.Value = this.publicFun_0.CheckString(base.Server.UrlDecode(this.httpCookie_1.Value));
                this.httpCookie_2.Value = this.publicFun_0.CheckString(base.Server.UrlDecode(this.httpCookie_2.Value));
                this.httpCookie_3.Value = this.publicFun_0.CheckString(base.Server.UrlDecode(this.httpCookie_3.Value));
                this.int_0 = Convert.ToInt32(base.Request["PaperID"].ToString());
                this.string_0 = this.publicFun_0.CheckString(base.Server.UrlDecode(base.Request["UserCode"].ToString()));
                SqlConnection connection = new SqlConnection(ConfigurationManager.ConnectionStrings["Conn"].ConnectionString);
                connection.Open();
                SqlCommand command = new SqlCommand("select CheckRubricJ,CheckRubricF,CheckRubricO,CheckRubricC,CheckRubricT,CheckRubricA,CheckRubricAN  from UserPower where UserCode='" + this.httpCookie_0.Value + "'", connection);
                SqlDataReader reader = command.ExecuteReader(CommandBehavior.CloseConnection);
                if (reader.Read())
                {
                    this.string_15 = reader["CheckRubricF"].ToString();
                    this.string_16 = reader["CheckRubricA"].ToString();
                    this.string_17 = reader["CheckRubricC"].ToString();
                    this.string_18 = reader["CheckRubricT"].ToString();
                    this.string_19 = reader["CheckRubricAN"].ToString();
                    this.string_20 = reader["CheckRubricO"].ToString();
                    this.string_21 = reader["CheckRubricJ"].ToString();
                }
                reader.Close();
                command.Dispose();
                connection.Close();
                connection.Dispose();
                this.Page.Title = ConfigurationManager.ConnectionStrings["ProTitle"].ConnectionString + "--人工批卷阅卷";
                if (!base.IsPostBack)
                {
                    if (!(this.publicFun_0.GetValues(string.Concat(new object[] { "select CheckStatus from CheckPaper where LastCheckUser<>'", this.httpCookie_0.Value, "' and UserCode='", this.string_0.Trim(), "' and PaperID=", this.int_0 }), "CheckStatus") == "B"))
                    {
                        this.ViewState["GetCountFen"] = "0";
                        this.method_0();
                        this.butCheck.Attributes.Add("onclick", @"javascript:{if(confirm('提交批改信息后将无法修改。\n\n确定批改无误并提交吗？')==false) return false;}");
                        this.publicFun_0.ExecuteSql(string.Concat(new object[] { "update CheckPaper set CheckStatus='B',LastCheckUser='", this.httpCookie_0.Value, "'  where UserCode='", this.string_0.Trim(), "' and PaperID=", this.int_0 }));
                        this.method_1();
                        this.method_3();
                        this.labCheckFen.Text = this.double_0.ToString();
                    }
                    else
                    {
                        base.Response.Write("<script>alert('此份试卷其它老师正在批改，请稍后再试！')</script>");
                        this.butCheck.Visible = false;
                    }
                }
            }
            else
            {
                base.Response.Write("<script language=javascript>top.location.href='../Index.htm';self.close();</script>");
            }
        }
    }
}

